package com.nexfra.vocsys.voc.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.nexfra.vocsys.test.domain.Countries;

@Component
public class VocMyjobMngrDao {
	@Autowired
	private SqlSession sqlSession;
	
	/**
	 * voc_id 시퀀스 채번
	 * @param sqlParams
	 */
	public String selectSeqVocId(HashMap<String, String> sqlParams) {
		return sqlSession.selectOne("VocMyjobMngrSqlMap.selectSeqVocId", sqlParams);
	}
	
	/**
	 * receipt_id 시퀀스 채번
	 * @param sqlParams
	 */
	public String selectSeqReceiptId(HashMap<String, String> sqlParams) {
		return sqlSession.selectOne("VocMyjobMngrSqlMap.selectSeqReceiptId", sqlParams);
	}
	
	/**
	 * voc마스터 등록
	 * @param sqlParams
	 */
	public void insertMasterVoc(HashMap<String, String> sqlParams) throws Exception {		
		sqlSession.insert("VocMyjobMngrSqlMap.insertMasterVoc", sqlParams);
	}	
	
	/**
	 * voc마스터 변경이력 등록
	 * @param sqlParams
	 */
	public void insertHistoryMasterVoc(HashMap<String, String> sqlParams) throws Exception {		
		sqlSession.insert("VocMyjobMngrSqlMap.insertHistoryMasterVoc", sqlParams);
	}	
	
	/**
	 * voc내용 등록
	 * @param sqlParams
	 */
	public void insertContent(HashMap<String, String> sqlParams) throws Exception {		
		sqlSession.insert("VocMyjobMngrSqlMap.insertContent", sqlParams);
	}	
	
	/**
	 * voc내용 변경 이력 등록
	 * @param sqlParams
	 */
	public void insertHistoryContent(HashMap<String, String> sqlParams) throws Exception {		
		sqlSession.insert("VocMyjobMngrSqlMap.insertHistoryContent", sqlParams);
	}	
	
	/**
	 * voc고객정보 등록
	 * @param sqlParams
	 */
	public void insertCustomer(HashMap<String, String> sqlParams) throws Exception {		
		sqlSession.insert("VocMyjobMngrSqlMap.insertCustomer", sqlParams);
	}	
	
	/**
	 * voc고객정보 변경 이력 등록
	 * @param sqlParams
	 */
	public void insertHistoryCustomer(HashMap<String, String> sqlParams) throws Exception {		
		sqlSession.insert("VocMyjobMngrSqlMap.insertHistoryCustomer", sqlParams);
	}	
	
	/**
	 * voc처리 프로세스 등록
	 * @param sqlParams
	 */
	public void insertProcess(HashMap<String, String> sqlParams) throws Exception {		
		sqlSession.insert("VocMyjobMngrSqlMap.insertProcess", sqlParams);
	}	
	
	/**
	 * voc첨부파일 등록
	 * @param sqlParams
	 */
	public void insertAttachFile(HashMap<String, String> sqlParams) throws Exception {		
		sqlSession.insert("VocMyjobMngrSqlMap.insertAttachFile", sqlParams);
	}	
}
